<?php

namespace Action;

class Welcome extends \Library\Action\PortalAction {

	private $_tabPane;

	public function execute() {
		parent::execute();
		
		$meta = \Library\Config::get( 'meta' );
		$this->setTitle( $meta['title'] );
	}
	
	public function getTabPane() {
		if( $this->_tabPane === null ) {
			$this->_tabPane = new \Library\Widget\TabPane();
			$this->_tabPane
				->getTab( 'basic' )
					->setTitle( 'By password' )
					->setContent( _view( 'New', \Library\Auth::get( 'Basic' ) ) )
					->getTabPane()
				->getTab( 'openid' )
					->setTitle( 'By OpenID' )
					->setContent( _view( 'New', \Library\Auth::get( 'OpenID' ) ) )
					->getTabPane();
		}
		return $this->_tabPane;
	}

}
